package com.ly.cola.controller;

import com.ly.cola.entity.EventEntity;
import com.ly.cola.publisher.LocalDomainEventPublisher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author LY
 * @create 2024/1/15 18:49
 * @Description 测试
 */
@RestController
public class TestController {

    @Autowired
    LocalDomainEventPublisher localDomainEventPublisher;

    @GetMapping("getStr")
    public String getStr(){
        EventEntity event = new EventEntity(1L, 0, "测试Cola事件");
        localDomainEventPublisher.publish(event);
        return "getStr ===>>>";
    }
}
